{% extends 'home.html' %}

{% block right_content %}
    <ol class="breadcrumb">
        <li><a href="{{ url_for('backend_page.home') }}">数据可视化系统</a></li>
        <li><a href="{{ url_for('backend_page.file_list') }}">文件列表</a></li>
        <li class="active">{{ table_name }}</li>
    </ol>
    <table class="table-bordered table">
        <thead>
        <tr style="background-color: dodgerblue; color: white;font-weight: bold">
            <th>ID</th>
            {% for col in admin_class.list_display %}
                <th>{{ col }}</th>
            {% endfor %}
                <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for k,row in data_list.iterrows() %}
            <tr>
                <td>
                    <a href="{{ url_for('backend_page.detail', table_name=table_name, index=k) }}">
                    {{ k }}
                    </a>
                </td>
                {% for col in admin_class.list_display %}
                    <td>{{ row[col] }}</td>
                {% endfor %}
            <td><a href="{{ url_for('backend_page.detail', table_name=table_name, index=k) }}">查看</a></td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    <ul class="pagination">
        {% if page_obj.num_pages > 1 %}
            {{ page_str }}
        {% else %}
        {% endif %}
    </ul>
{% endblock %}